package com.ruoyi.hospital.service.order;

import java.math.BigDecimal;
import java.util.List;

import com.ruoyi.hospital.domain.prescriptionInfo.PrescriptionDrug;
import com.ruoyi.hospital.domain.vo.OrderDetailVo;
import com.ruoyi.hospital.dto.HotDrug;
import com.ruoyi.hospital.dto.Piedate;
import com.ruoyi.hospital.domain.order.ShopOrders;

/**
 * 商品订单Service接口
 * 
 * @author wendao
 * @date 2024-08-19
 */
public interface IShopOrdersService 
{
    /**
     * 查询商品订单
     * 
     * @param id 商品订单主键
     * @return 商品订单
     */
    public ShopOrders selectShopOrdersById(Integer id);
    public OrderDetailVo selectShopOrdersByIdFordocincome(Integer id);
    /**
     * 查询商品订单列表
     * 
     * @param shopOrders 商品订单
     * @return 商品订单集合
     */
    public List<ShopOrders> selectShopOrdersList(ShopOrders shopOrders);

    /**
     * 新增商品订单
     * 
     * @param shopOrders 商品订单
     * @return 结果
     */
    public int insertShopOrders(ShopOrders shopOrders);

    /**
     * 修改商品订单
     * 
     * @param shopOrders 商品订单
     * @return 结果
     */
    public int updateShopOrders(ShopOrders shopOrders);
    /*
    * 支付的逻辑
    * */
    public int updateShopOrdersForpay(ShopOrders shopOrders);
    /**
     * 批量删除商品订单
     * 
     * @param ids 需要删除的商品订单主键集合
     * @return 结果
     */
    public int deleteShopOrdersByIds(Integer[] ids);

    /**
     * 删除商品订单信息
     * 
     * @param id 商品订单主键
     * @return 结果
     */
    public int deleteShopOrdersById(Integer id);

    /**
     * 统计订单的总费用
     * */
    public double getNum(Integer drugType);

    /*
     * 药店销量统计
     * */
    public List<Piedate> getStoreData();

    /*
     * 热销产品统计
     * */
    public List<HotDrug> getHotDrug();

    /*
     * 患者端通过处方   --->立即购药：参数为商品
     * */
    public  ShopOrders  purchase(List<PrescriptionDrug> prescriptionDrugs, Integer pid, Integer memberId, BigDecimal drugPrice);

    /*
     * 患者端通过药房   --->购药
     * */
    public  ShopOrders  purchaseByStore(ShopOrders shopOrders,Integer memberId);

}
